<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php


class MFieldVerifier
{



	
	public static function getDeviceUUID($device_info, $user_id) {
		return md5("{$device_info}{$user_id}RGeavfnK8GMjBjDQ");
	}


	
	public static function isPhone($phone){
		$count = strlen($phone);
		if($count - 11 != 0){
			return false;
		}

		$pattern = "^[0-9]*$";
		if(!preg_match("/($pattern)/i", $phone)){
			return false;
		}
		return true;
	}


	
	public static function isEmail($email){
		$pattern = "^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+";
		if(preg_match("/($pattern)/i",$email)){
			return true;
		}
		return false;
	}

}

?>